package com.zhihuishu.micro.course.service.impl;

import com.zhihuishu.micro.course.dto.LessonDto;
import com.zhihuishu.micro.course.service.LessonTreenityRedisService;
import com.zhihuishu.toolkit.jedis.JedisHelper;
import org.springframework.stereotype.Service;

@Service("lessonAllServiceRedis")
public class LessonAllServiceRedisImpl extends BaseTreenityBatchServiceRedisImpl<LessonDto> implements LessonTreenityRedisService {
    @Override
    protected Class<LessonDto> getDTOClass() {
        return LessonDto.class;
    }

    @Override
    public String getObjectKey(Integer lessonId) {
        return JedisHelper.key("cc:lesson", lessonId);
    }

    @Override
    public String getIdsKey(long courseId) {
        return JedisHelper.key("cc:course", courseId, "lessons");
    }


}
